<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>用户注册页面</title>
<script src="webjars/jquery/3.1.1/jquery.min.js"></script>
<script src="webjars/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link rel="stylesheet"
	href="webjars/bootstrap/3.3.5/css/bootstrap.min.css" />
<script type="text/javascript" src="/js/kaptcha.js"></script>
<script type="text/javascript" src="/js/validate.js"></script>
<script type="text/javascript" src="/js/register.js"></script>
<script type="text/javascript">
          var isCommitted = false;//表单是否已经提交标识，默认为false
          function dosubmit(){
              if(isCommitted==false){
                 isCommitted = true;//提交表单后，将表单是否已经提交标识设置为true
                 return true;//返回true让表单正常提交
             }else{
                 return false;//返回false那么表单将不提交
             }
         }
          
          
          
      	function getCurrentDate(format) {
      	  var now = new Date();
      	  var year = now.getFullYear(); //得到年份
      	  var month = now.getMonth();//得到月份
      	  var date = now.getDate();//得到日期
      	  var day = now.getDay();//得到周几
      	  var hour = now.getHours();//得到小时
      	  var minu = now.getMinutes();//得到分钟
      	  var sec = now.getSeconds();//得到秒
      	  month = month + 1;
      	  if (month < 10) month = "0" + month;
      	  if (date < 10) date = "0" + date;
      	  if (hour < 10) hour = "0" + hour;
      	  if (minu < 10) minu = "0" + minu;
      	  if (sec < 10) sec = "0" + sec;
      	  var time = "";
      	  //精确到天
      	  if(format==1){
      		time = year + "-" + month + "-" + date;
      	  }
      	  //精确到分
      	  else if(format==2){
      		document.getElementById("Date").value= year + "-" + month + "-" + date+ " " + hour + ":" + minu + ":" + sec;
      	  }
      	  return time;
      	}
     </script>
</head>
<body onload="getCurrentDate(2)">
	<!-- begin:添加一个注册表单 -->
	<div>
		<form id="insert_modal" class="form-horizontal">
			<div class="col-sm-10">
				<input type="text" class="form-control" id="insert_name" name="name"
					placeholder="请输入账号" /> <span class="help-block"></span>
			</div>
			<div class="col-sm-10">
				<input type="password" class="form-control" id="insert_password"
					name="password" placeholder="请输入密码" /> <span class="help-block"></span>
			</div>

			<div class="col-sm-10">
				<input type="text" class="form-control" id="phone" name="phone"
					placeholder="电话号码" /> <span class="help-block"></span>
			</div>

			<input type="hidden" name="retime" id="Date" th:value="*{retime}" />

			<input type="hidden" name="olCreatorId" id="olCreatorId"
				th:value="*{olCreatorId}" />

			<!-- begin:验证码 -->
			<div class="col-sm-10">
				<input type="text" class="form-control" id="kaptcha" name="kaptcha"
					placeholder="请输入验证码" style="color: #000000;" /><span
					class="help-block"></span> <img src="kaptcha.jpg" width="200"
					id="kaptchaImage" title="看不清，点击换一张" /> <small>看不清，点击换一张</small>

				<p></p>
				<button type="button" class="btn btn-primary" id="user_insert_btn">注册</button>

				<div>
					<!-- begin:登录功能 -->
					<p></p>
					<p>
						<a th:href="@{/signin} ">点击前往登录吧！</a>
					</p>
				</div>

			</div>
			<!-- end:验证码 -->

		</form>

	</div>




</body>
</html>